package cn.wolfcode.plus.web.controller;

import cn.wolfcode.plus.domain.Role;
import cn.wolfcode.plus.qo.PageResult;
import cn.wolfcode.plus.qo.QueryObject;
import cn.wolfcode.plus.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Author wyy
 * Date 2021/2/16 17:20
 **/
@Controller
@RequestMapping("/role")
public class RoleController {
    @Autowired
    private IRoleService roleService;

    @RequestMapping("/list")
    //@ResponseBody
    public String list(Model model, QueryObject qo){
        PageResult<Role> result = roleService.query(qo);
        model.addAttribute("result",result);
        return "role/list";
    }
}
